package com.zzc.qqchat.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.ArrayList;

public interface GroupRep extends JpaRepository<Group,Integer> {

    @Query(value = "select * from grouplist where group_Id=?1",nativeQuery = true)
    ArrayList<Group> findByGroupId(int groupId);

    @Query(value = "select * from grouplist where user_Id=?1",nativeQuery = true)
    ArrayList<Group> findByUserId(int userId);
}
